Skip to main content

WaterMarkComponent

WaterMarkComponent API

WaterMarkComponent.setWaterMarkVisible
WaterMarkComponent.setWaterMarkVisible(visible: boolean): void

Sets the visibility of the watermark component.

Parameters
visible: boolean
- A boolean indicating whether the watermark should be visible or not.
Returns
void
WaterMarkComponent.setWaterMarkData
WaterMarkComponent.setWaterMarkData(watermarkData: WaterMarkData): void

Sets the watermark data to be used in the canvas.

Parameters
watermarkData: WaterMarkData
- The data to be used as watermark.
Returns
void
WaterMarkComponent.getWaterMarkData
WaterMarkComponent.getWaterMarkData(): WaterMarkData

Returns the water mark data object if it exists, otherwise returns an empty object.

Returns
WaterMarkData
WaterMarkComponent.setWaterMarkConfig
WaterMarkComponent.setWaterMarkConfig(watermarkConfig: ChartConfigComponentsWaterMark): void

Sets the watermark configuration for the chart.

Parameters
watermarkConfig: ChartConfigComponentsWaterMark
- The configuration object for the watermark.
Returns
void
WaterMarkComponent.setLogoImage
WaterMarkComponent.setLogoImage(img: CanvasImageSource): void

Sets the logo image to be used as a watermark.

Parameters
img: CanvasImageSource
- The image to be used as a watermark.
Returns
void
WaterMarkComponent.recalculateTextSize
WaterMarkComponent.recalculateTextSize(chartWidth: number, chartHeight: number): { firstRowFontSize: number; secondRowFontSize: number; thirdRowFontSize: number; visible: boolean; position: WaterMarkPositionType; offsetX: number; offsetY: number; ... 5 more ...; thirdRowBottomPadding: number; }

Recalculates the watermark text size based on the chart's width and height.

Parameters
chartWidth: number
- The width of the chart.
chartHeight: number
- The height of the chart.
Returns
{ firstRowFontSize: number; secondRowFontSize: number; thirdRowFontSize: number; visible: boolean; position: WaterMarkPositionType; offsetX: number; offsetY: number; ... 5 more ...; thirdRowBottomPadding: number; }